package org.example.demos.web;

import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FanoutConfiguration {
    @Bean
    public FanoutExchange fanoutExchange() {
        return ExchangeBuilder.fanoutExchange("mirror.fanout2").durable(true).build();
    }
    @Bean
    public Queue fanoutQueue3(){
        return QueueBuilder.durable("fanout.queue3").build();
    }
    @Bean
    public Binding bingding3(FanoutExchange fanoutExchange,Queue fanoutQueue3){
        return BindingBuilder.bind(fanoutQueue3()).to(fanoutExchange());
    }
}
